home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINPROGS / EWDLL011.ZIP / EWDLL.H < prev    next >
C/C++ Source or Header  |  1994-02-15  |  3KB  |  57 lines

  1. /*---------------------------------------------------------------------------*/
  2. /* EWDLL.H - Borland C++ 4.0 - Embedded Window API Header File               */
  3. /* Copyright (C) 1994 by R&R Engineering - All Rights Reserved               */
  4. /*                                                                           */
  5. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  6. /*                                                                           */
  7. /*  This library is free software; you can redistribute it and/or modify it  */
  8. /*  under the terms of the GNU Library General Public License as published   */
  9. /*  by the Free Software Foundation; either version 2 of the License, or     */
  10. /*  (at your option) any later version.                                      */
  11. /*                                                                           */
  12. /*  This library is distributed in the hope that it will be useful, but      */
  13. /*  WITHOUT ANY WARRANTY; without even the implied warranty of               */
  14. /*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        */
  15. /*  Library General Public License for more details.                         */
  16. /*                                                                           */
  17. /*  You should have received a copy of the GNU Library General Public        */
  18. /*  License along with this library; if not, write to the Free Software      */
  19. /*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                */
  20. /*                                                                           */
  21. /*---------------------------------------------------------------------------*/
  22.  
  23. #ifndef __EWM_H
  24. #define __EWM_H
  25.  
  26. // Define messages specific to embedded window DLLs
  27. #define EWM_RENDER     0x706A
  28. #define EWM_QUERYSIZE  0x706B
  29. #define EWM_ASKPALETTE 0x706C
  30.  
  31. // Define the CREATEINFO structure passed in CREATESTRUCT
  32. typedef struct {
  33.    short  idMajVersion;
  34.    short  idMinVersion;
  35.    LPSTR  lpstrFileName;
  36.    LPSTR  lpstrAuthorData;
  37.    HANDLE hfs;
  38.    DWORD  coForeground;
  39.    DWORD  coBackground;
  40. } CREATEINFO;
  41.  
  42. // Define the RENDERINFO structure passed in the EWM_RENDER message
  43. typedef struct {
  44.    RECT rc;
  45.    HDC  hdc;
  46. } RENDERINFO;
  47.  
  48. // Message crackers for the EWM messages (16-bit versions)
  49. #define HANDLE_EWM_RENDER( hWnd, wParam, lParam, fn ) \
  50.         ((LRESULT)(fn)( (hWnd), (wParam), (RENDERINFO*)(lParam) ))
  51. #define HANDLE_EWM_QUERYSIZE( hWnd, wParam, lParam, fn ) \
  52.         ((fn)( (hWnd), (HDC)(wParam), (POINT*)(lParam) ))
  53. #define HANDLE_EWM_ASKPALETTE( hWnd, wParam, lParam, fn ) \
  54.         ((LRESULT)(fn)( (hWnd) ))
  55.  
  56. #endif
  57.